﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace W.Warehouse.Repository.Migrations
{
    /// <inheritdoc />
    public partial class log1 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "AllocationProductInfos",
                columns: table => new
                {
                    AllocationProductId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ProductName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProductNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProductSpec = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProductBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProductPrice = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    Quantity = table.Column<int>(type: "int", nullable: true),
                    BinLocationName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    WarehouseId = table.Column<int>(type: "int", nullable: true),
                    officeId = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    userid = table.Column<int>(type: "int", nullable: true),
                    AllocationId = table.Column<int>(type: "int", nullable: true),
                    CreateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DeleteName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DeleteTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_AllocationProductInfos", x => x.AllocationProductId);
                });

            migrationBuilder.CreateTable(
                name: "Allocations",
                columns: table => new
                {
                    AllocationId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    AllocationNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    WarehouseId = table.Column<int>(type: "int", nullable: true),
                    AWarehouseName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AssociateNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SingleMaker = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SingleTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    AllocationRemarks = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AllocationStatus = table.Column<int>(type: "int", nullable: true),
                    ExamineReason = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ExaminePeople = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ExamineTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    officeId = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    userid = table.Column<int>(type: "int", nullable: true),
                    CreateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DeleteName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DeleteTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Allocations", x => x.AllocationId);
                });

            migrationBuilder.CreateTable(
                name: "BinLocations",
                columns: table => new
                {
                    BinLocationId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    BinLocationNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    WarehouseId = table.Column<int>(type: "int", nullable: true),
                    BinLocationName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    WarehouseLocationId = table.Column<int>(type: "int", nullable: true),
                    WarehouseLocationName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsDisable = table.Column<bool>(type: "bit", nullable: true),
                    IsDefault = table.Column<bool>(type: "bit", nullable: true),
                    BinLocationRemarks = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    office_id = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    user_id = table.Column<int>(type: "int", nullable: true),
                    CreateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DeleteName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DeleteTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_BinLocations", x => x.BinLocationId);
                });

            migrationBuilder.CreateTable(
                name: "Checks",
                columns: table => new
                {
                    CheckId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    CheckNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AssociateNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CheckMakeHe = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CheckDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    CheckNotes = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProductId = table.Column<int>(type: "int", nullable: true),
                    AuditStatus = table.Column<int>(type: "int", nullable: true),
                    CheckType = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    office_id = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    user_id = table.Column<int>(type: "int", nullable: true),
                    ExamineReason = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ExaminePeople = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ExamineTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    CreateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DeleteName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DeleteTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Checks", x => x.CheckId);
                });

            migrationBuilder.CreateTable(
                name: "MoveProducts",
                columns: table => new
                {
                    MoveProductId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ProductName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProductNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProductSpec = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Batch = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Price = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    OutStorageNum = table.Column<int>(type: "int", nullable: true),
                    BinLocationName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BinLocationId = table.Column<int>(type: "int", nullable: true),
                    office_id = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    user_id = table.Column<int>(type: "int", nullable: true),
                    MoveTheLibraryId = table.Column<int>(type: "int", nullable: true),
                    CreateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DeleteName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DeleteTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_MoveProducts", x => x.MoveProductId);
                });

            migrationBuilder.CreateTable(
                name: "MoveTheLibrarys",
                columns: table => new
                {
                    MoveTheLibraryId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    MoveTheLibraryNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    MoveTheLibraryType = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    WarehouseId = table.Column<int>(type: "int", nullable: false),
                    AssociateNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SingleMaker = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    MakeTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    MoveRemark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AuditStatus = table.Column<int>(type: "int", nullable: true),
                    office_id = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    user_id = table.Column<int>(type: "int", nullable: true),
                    ExamineReason = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ExaminePeople = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ExamineTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    CreateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DeleteName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DeleteTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_MoveTheLibrarys", x => x.MoveTheLibraryId);
                });

            migrationBuilder.CreateTable(
                name: "Outbounds",
                columns: table => new
                {
                    Outboundid = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    OutboundNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    OutboundType = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AssociateNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CustomerNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CustomerName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CustomerContact = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CustomerPhone = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SingleMaker = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SingleTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    OutboundRemarks = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    OutboundState = table.Column<int>(type: "int", nullable: true),
                    ExamineReason = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ExaminePeople = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ExamineTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DeliveryTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    office_id = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    user_id = table.Column<int>(type: "int", nullable: true),
                    CreateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DeleteName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DeleteTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Outbounds", x => x.Outboundid);
                });

            migrationBuilder.CreateTable(
                name: "OutStorageProductss",
                columns: table => new
                {
                    OutboundidProductsId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ProductName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProductNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProductSpec = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Batch = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Price = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    OutStorageNum = table.Column<int>(type: "int", nullable: true),
                    TotalPrice = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    BinLocationName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    office_id = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    user_id = table.Column<int>(type: "int", nullable: true),
                    Outboundid = table.Column<int>(type: "int", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_OutStorageProductss", x => x.OutboundidProductsId);
                });

            migrationBuilder.CreateTable(
                name: "ReportlossesInfos",
                columns: table => new
                {
                    ReportlossesId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ReportlossesNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ReportlossesType = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AssociateNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SingleMaker = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    MakeTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    MoveRemark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DocumentState = table.Column<int>(type: "int", nullable: true),
                    ExamineReason = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ExaminePeople = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ExamineTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    officeId = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    userid = table.Column<int>(type: "int", nullable: true),
                    ProductId = table.Column<int>(type: "int", nullable: true),
                    Wlocator = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    WRepolocator = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DeleteName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DeleteTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ReportlossesInfos", x => x.ReportlossesId);
                });

            migrationBuilder.CreateTable(
                name: "ReportProducts",
                columns: table => new
                {
                    ReportProductId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ProductName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProductNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProductSpec = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Batch = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Price = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ReportNum = table.Column<int>(type: "int", nullable: true),
                    BinLocationName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    officeId = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    userid = table.Column<int>(type: "int", nullable: true),
                    ReportlossesId = table.Column<int>(type: "int", nullable: true),
                    CreateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DeleteName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DeleteTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ReportProducts", x => x.ReportProductId);
                });

            migrationBuilder.CreateTable(
                name: "Statisticss",
                columns: table => new
                {
                    StatisticsId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ProductName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProductNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProductSpec = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    StatisticsBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UnitId = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BinLocationName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    office_id = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    user_id = table.Column<int>(type: "int", nullable: true),
                    StatisticsSum = table.Column<int>(type: "int", nullable: true),
                    CheckId = table.Column<int>(type: "int", nullable: true),
                    CreateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DeleteName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DeleteTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Statisticss", x => x.StatisticsId);
                });

            migrationBuilder.CreateTable(
                name: "StorageProductss",
                columns: table => new
                {
                    StorageProductsId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ProductName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProductNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProductSpec = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Batch = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Price = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    StorageNum = table.Column<int>(type: "int", nullable: true),
                    TotalPrice = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    BinLocationName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    office_id = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    user_id = table.Column<int>(type: "int", nullable: true),
                    StorageId = table.Column<int>(type: "int", nullable: true),
                    CreateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DeleteName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DeleteTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_StorageProductss", x => x.StorageProductsId);
                });

            migrationBuilder.CreateTable(
                name: "Storages",
                columns: table => new
                {
                    StorageId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    StorageNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    StorageType = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AssociateNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    VendorNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    VendorName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    VendorContact = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    VendorPhone = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SingleMaker = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SingleTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    StorageRemarks = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    StorageStatus = table.Column<int>(type: "int", nullable: true),
                    ExamineReason = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ExaminePeople = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ExamineTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    office_id = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    user_id = table.Column<int>(type: "int", nullable: true),
                    CreateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DeleteName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DeleteTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Storages", x => x.StorageId);
                });

            migrationBuilder.CreateTable(
                name: "WarehouseInfos",
                columns: table => new
                {
                    WarehouseId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    WarehouseNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DepartmentId = table.Column<int>(type: "int", nullable: true),
                    WarehouseName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    WarehouseTypeId = table.Column<int>(type: "int", nullable: true),
                    Function = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    LeaseDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    WarehouseArea = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    WarehouseAddress = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    WarehouseContact = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    WarehousePhone = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    WhetherDisable = table.Column<bool>(type: "bit", nullable: true),
                    WhetherDefault = table.Column<bool>(type: "bit", nullable: true),
                    office_id = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    user_id = table.Column<int>(type: "int", nullable: true),
                    CreateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DeleteName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DeleteTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_WarehouseInfos", x => x.WarehouseId);
                });

            migrationBuilder.CreateTable(
                name: "WarehouseLocations",
                columns: table => new
                {
                    WarehouseLocationId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    WarehouseLocationName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    office_id = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    user_id = table.Column<int>(type: "int", nullable: true),
                    CreateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DeleteName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DeleteTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_WarehouseLocations", x => x.WarehouseLocationId);
                });

            migrationBuilder.CreateTable(
                name: "WarehouseTypes",
                columns: table => new
                {
                    WarehouseTypeId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    WarehouseTypeName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    office_id = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    user_id = table.Column<int>(type: "int", nullable: true),
                    CreateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DeleteName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DeleteTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_WarehouseTypes", x => x.WarehouseTypeId);
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "AllocationProductInfos");

            migrationBuilder.DropTable(
                name: "Allocations");

            migrationBuilder.DropTable(
                name: "BinLocations");

            migrationBuilder.DropTable(
                name: "Checks");

            migrationBuilder.DropTable(
                name: "MoveProducts");

            migrationBuilder.DropTable(
                name: "MoveTheLibrarys");

            migrationBuilder.DropTable(
                name: "Outbounds");

            migrationBuilder.DropTable(
                name: "OutStorageProductss");

            migrationBuilder.DropTable(
                name: "ReportlossesInfos");

            migrationBuilder.DropTable(
                name: "ReportProducts");

            migrationBuilder.DropTable(
                name: "Statisticss");

            migrationBuilder.DropTable(
                name: "StorageProductss");

            migrationBuilder.DropTable(
                name: "Storages");

            migrationBuilder.DropTable(
                name: "WarehouseInfos");

            migrationBuilder.DropTable(
                name: "WarehouseLocations");

            migrationBuilder.DropTable(
                name: "WarehouseTypes");
        }
    }
}
